﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ProjectBase.Core;
using $prjsn$.Entity.Services;
using $prjsn$.Entity;

namespace $safeprojectname$.Core.Mvc
{
    public class DummyBindingEntity : Persistent<int>
    {
        // members
        IList<Translator> _translators;
        IList<User> _users;

        public virtual string Code { get; set; }
        public virtual string Name { get; set; }
        public virtual int Age { get; set; }
        public virtual int? Limit { get; set; }
        public virtual DateTime ValidFrom { get; set; }
        public virtual DateTime? ValidTo { get; set; }

        public virtual Translator FirstTranslator { get; set; }
        public virtual User User { get; set; }

        public virtual IList<Translator> Translators
        {
            get { return _translators ?? (_translators = new List<Translator>()); }
            set { _translators = value; }
        }
        public virtual IList<User> Users
        {
            get { return _users ?? (_users = new List<User>()); }
            set { _users = value; }
        }

        public override string ToDisplay()
        {
            return Name;
        }

        protected override string GetDomainObjectSignature()
        {
            return Code;
        }
    }
}
